package com.bookmarket.dao;

import com.bookmarket.entity.Address;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * LLAddressMapper
 *
 * @author 李亮
 * @date 2018/1/2
 */
@Repository("/addressDao")
public interface LLAddressMapper {
   public List<Address> getall(int id);
   @Delete("delete  from tb_address  where id=#{id}")
   public void dell(int id);
   @Insert("insert  into tb_address (custom_id,address,uname,phone)values(#{custom.id},#{address},#{uname},#{phone})")
   public void add(Address address);
   @Update("update tb_address set uname=#{uname},address=#{address},phone=#{phone} where id=#{id}")
   public void update (Address address);
   @Update("update tb_custom set pass=#{0} where id=#{1}")
   public void updatepass(String pass,int id);
}